package net.gxnun.xiaoyuan.core.share;

import net.gxnun.xiaoyuan.core.message.request.RequestMsg;

import com.thoughtworks.xstream.XStream;

/**
 * XML转换成Message的工具类
 * @author yesheng
 *
 */
public class XmlToMessage {
    
    public static RequestMsg parseMsg(String xml,String msgType){
        XStream xs = MessageToXStreamUtils.getInstance().getXStream(msgType);
        return (RequestMsg)xs.fromXML(xml);
    }
    
}
